package com.biz.primus.ms.sms.dao.po;

import com.biz.primus.ms.base.jpa.po.BaseEntityPKIncrement;

import javax.persistence.*;
import java.util.concurrent.TimeUnit;

/**
 * @author yanweijin
 * @date 2017/6/10
 */
@Entity
@Table(name = "cmp_flow_ctrl_rule")
public class FlowControlRule extends BaseEntityPKIncrement {

    private static final long serialVersionUID = 4501994300460765802L;
    @Column(name = "include_keyword")
    private String includeKeyword;

    @Enumerated(EnumType.STRING)
    @Column(name = "time_unit", length = 32)
    private TimeUnit timeUnit;

    @Column(name = "time_length")
    private Integer timeLength;

    @Column(name = "max_sent", nullable = false)
    private Integer maxSent;

    //逗号分隔值,存放channelCode,如果为all,表示应用到所有渠道
    @Column(name = "applied_channels")
    private String appliedChannels = "all";

    public String getIncludeKeyword() {
        return includeKeyword;
    }

    public void setIncludeKeyword(String includeKeyword) {
        this.includeKeyword = includeKeyword;
    }

    public TimeUnit getTimeUnit() {
        return timeUnit;
    }

    public void setTimeUnit(TimeUnit timeUnit) {
        this.timeUnit = timeUnit;
    }

    public Integer getTimeLength() {
        return timeLength;
    }

    public void setTimeLength(Integer timeLength) {
        this.timeLength = timeLength;
    }

    public Integer getMaxSent() {
        return maxSent;
    }

    public void setMaxSent(Integer maxSent) {
        this.maxSent = maxSent;
    }

    public String getAppliedChannels() {
        return appliedChannels;
    }

    public void setAppliedChannels(String appliedChannels) {
        this.appliedChannels = appliedChannels;
    }
}
